import { request } from '@/utils'

export default {
  manage: {
    manageUserLogin: (data) => request.post('/manage/admin/login', data,{ noNeedToken: true, headers: {'Content-Type':'application/x-www-form-urlencoded'} }), // 后台管理用户登录
    manageUserInfo: () => request.get('/manage/admin/info'), //后台管理用户信息
    manageUserRefreshToken: () => request.post('/manage/admin/refresh_token',null,{noNeedTip: true}), // 后台管理用户 token 刷新
    manageUserPage: (params) => request.get(`/manage/admin/page?page=${params.page}&limit=${params.limit}`), // 后台管理用户列表查询
    manageUserAdd: (params) => request.get(`/manage/admin/create?username=${params.username}&password=${params.password}&nickname=${params.nickname}&fullname=${params.fullname}&department=${params.department}&phone=${params.phone}&position=${params.position}&status=${params.status}&role_id=${params.role_id}`), //后台管理用户新增
    
  },
  getUser: () => request.get('/user'),
  refreshToken: () => request.post('/auth/refreshToken', null, { noNeedTip: true }),
}
